package com.dnjn.happiness.survey.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dnjn.happiness.common.security.utils.SecurityUtils;
import com.dnjn.happiness.survey.domain.CheckItem;
import com.dnjn.happiness.survey.domain.vo.CheckItemVO;
import com.dnjn.happiness.survey.mapper.CheckItemMapper;
import com.dnjn.happiness.survey.service.ICheckItemService;
import com.dnjn.happiness.system.api.model.LoginUser;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 考核Service业务层处理
 *
 * @author happiness
 * @date 2024-04-01
 */
@Service
public class CheckItemServiceImpl  extends ServiceImpl<CheckItemMapper, CheckItem>  implements ICheckItemService
{


    @Override
    public Page<CheckItemVO> queryCheckItemByCheckId(Page page, String nickName, String checkStatus,String checkId,Long deptId,Long teamId) {
        return baseMapper.queryCheckItemByCheckId(page,nickName,checkStatus,checkId, deptId,teamId);
    }

    @Override
    public List<CheckItem> getCheckItem(String checkStatus) {
        return baseMapper.getCheckItem(SecurityUtils.getUserId(),checkStatus);
    }



    @Override
    public List<CheckItemVO> queryCheckItemByCheckIdAndUserId(Long checkId, Long userId) {
        return baseMapper.queryCheckItemByCheckIdAndUserId(checkId,userId);
    }

    @Override
    public List<CheckItemVO> getItemByUserId(Long userId) {
        return baseMapper.getItemByUserId(userId);
    }
}
